<?php
include "../sys/Kernel.amv.php";
$main = new main();
if(isset($_REQUEST['user']) AND $_REQUEST['sess'] AND $main->validSession($_REQUEST['user'], $_REQUEST['sess']) === true)/* Si l'utilisateur a bien envoyer ses données de sessions, on verifie si il est connecté */
{
	if(isset($_REQUEST['libelCateg']) AND isset($_REQUEST['sexeCont']))
	{
		$rep = $bdd->query("SELECT * FROM equipe");//WHERE categ = '".$_REQUEST['idCateg']."'");
		
		$i = 0;
		while($donnees = $rep->fetch())
		{
			$myArray[$i] = $donnees;
			$i++;
		}
		echo json_encode(array('Finished',$myArray));
	}
	elseif($_REQUEST['toDelete'])
	{
		
	}
	else
	{
		echo json_encode('invalidData');
	}
}
else
{
	echo json_encode('invalidSess');
}
?>